<script setup lang="ts">
import { defineOptions, ref } from "vue";

defineOptions({
  name: "xt-tree",
});

interface PropType {}

withDefaults(defineProps<PropType>(), {});

const tree = ref();
defineExpose({
  $ref: tree,
});
</script>

<template>
  <el-tree ref="tree" class="xt-tree">
    <template v-for="(_value, name) in $slots" #[name]="scope" :key="name">
      <slot :name="name" v-bind="scope || {}"></slot>
    </template>
  </el-tree>
</template>

<style lang="scss" scoped></style>
